package top.whysu.edevice.dto.device;

import org.hibernate.validator.constraints.NotBlank;
import top.whysu.edevice.annotation.DataDictionaryValidAnnotation;
import top.whysu.edevice.constant.DataDictionary;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 添加/编辑设备请求参数
 */
public class DeviceAddModifyDTO {
    /**
     * 设备主键id
     */
    private BigDecimal id;
    /**
     * 树结构父id(新增的时候使用)
     */
    private BigDecimal treePid;
    /**
     * 凭证组树结构id(新增的时候使用)
     */
    private BigDecimal voucherTreeId;
    /**
     * 凭证组id (编辑的时候使用)
     */
    private BigDecimal voucherId;

    /**
     * 设备序列号
     */
    private String deviceSerial;
    /**
     * 设备名称
     */
    @NotBlank(message = "设备名称不能为空")
    private String deviceName;
    /**
     * 设备类型 {@link top.whysu.edevice.constant.DataDictionary.DeviceType}
     */
    @NotNull(message = "设备类型不能为空")
    @DataDictionaryValidAnnotation(message = "设备类型码值不正确",target = DataDictionary.DeviceType.class)
    private Integer deviceType;
    /**
     * 设备验证码
     */
    private String deviceCode;
    /**
     * 厂商
     */
    private String manufacturer;

    /**
     * MAC地址
     */
    private String mac;

    public BigDecimal getId() {
        return id;
    }

    public void setId(BigDecimal id) {
        this.id = id;
    }

    public BigDecimal getTreePid() {
        return treePid;
    }

    public void setTreePid(BigDecimal treePid) {
        this.treePid = treePid;
    }

    public BigDecimal getVoucherTreeId() {
        return voucherTreeId;
    }

    public void setVoucherTreeId(BigDecimal voucherTreeId) {
        this.voucherTreeId = voucherTreeId;
    }

    public BigDecimal getVoucherId() {
        return voucherId;
    }

    public void setVoucherId(BigDecimal voucherId) {
        this.voucherId = voucherId;
    }

    public String getDeviceSerial() {
        return deviceSerial;
    }

    public void setDeviceSerial(String deviceSerial) {
        this.deviceSerial = deviceSerial;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Integer getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(Integer deviceType) {
        this.deviceType = deviceType;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }
}